package com.ydl.learning.flink.demo.mySink

import org.apache.flink.streaming.api.functions.sink.{RichSinkFunction, SinkFunction}
import org.slf4j.{Logger, LoggerFactory}

/**
 *
 *
 * @author ydl
 * @since 2020/11/13
 */
class LogSink[IN] extends RichSinkFunction[IN]{
  private final val log:Logger = LoggerFactory.getLogger(classOf[LogSink[IN]])
  override def invoke(value: IN, context: SinkFunction.Context): Unit = {
    log.info(value.toString)
  }
}
